﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;

namespace UtilsORM.MySqlData;

[Index("dc_guid", Name = "idxdcguid")]
[Index("dc_key", Name = "idxkey")]
[Index("dc_model_guid", Name = "idxmodelguid")]
[Index("dc_status", Name = "idxstatus")]
[MySqlCharSet("utf8mb3")]
[MySqlCollation("utf8mb3_general_ci")]
public partial class iot_device_command
{
    [Key]
    public long dc_id { get; set; }

    public string dc_guid { get; set; }

    /// <summary>
    /// 指令内容
    /// </summary>
    [StringLength(500)]
    public string dc_content { get; set; }

    /// <summary>
    /// 指令key
    /// </summary>
    [StringLength(50)]
    public string dc_key { get; set; }

    /// <summary>
    /// 名称
    /// </summary>
    [StringLength(255)]
    public string dc_name { get; set; }

    /// <summary>
    /// 0正常，1禁用
    /// </summary>
    public int? dc_status { get; set; }

    [Column(TypeName = "datetime")]
    public DateTime? dc_mod_time { get; set; }

    [Column(TypeName = "datetime")]
    public DateTime? dc_add_time { get; set; }

    /// <summary>
    /// 备注
    /// </summary>
    [StringLength(100)]
    public string dc_remark { get; set; }

    /// <summary>
    /// 型号
    /// </summary>
    [StringLength(50)]
    public string dc_model_guid { get; set; }

    /// <summary>
    /// 协议
    /// </summary>
    [StringLength(50)]
    public string dc_agreement_type { get; set; }

    /// <summary>
    /// 协议
    /// </summary>
    [StringLength(50)]
    public string dc_agreement_guid { get; set; }

    /// <summary>
    /// 0一般指令可展示，1设备初始化配置参数 d_parameter_init
    /// </summary>
    public int dc_key_type { get; set; }

    public int? dc_order { get; set; }
}
